Enable the size column in recent files/search
authorBenjamin Otte <otte@gnome.org>
Thu, 25 Jun 2009 11:18:04 +0000 (13:18 +0200)
committerBenjamin Otte <otte@gnome.org>
Thu, 15 Oct 2009 20:01:40 +0000 (22:01 +0200)
Previously information about file sizes was not available for search
results and recent files, so the column was always hidden. As this
information is now available, we can stop the special handling and use
the same setting as in browse mode.

gtk/gtkfilechooserdefault.c

index e5f36b7f8ba61395a9c0492c7251f29e23ee9de7..778a15d33765b1588d6eddaf3d07cd3aebec6932 100644 (file)
@@ -4004,9 +4004,8 @@ show_size_column_toggled_cb (GtkCheckMenuItem *item,
 {
   impl->show_size_column = gtk_check_menu_item_get_active (item);
 
-  if (impl->list_size_column)
-    gtk_tree_view_column_set_visible (impl->list_size_column,
-                                      impl->show_size_column);
+  gtk_tree_view_column_set_visible (impl->list_size_column,
+                                    impl->show_size_column);
 }
 
 /* Shows an error dialog about not being able to select a dragged file */
@@ -5959,8 +5958,7 @@ settings_load (GtkFileChooserDefault *impl)
     gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), expand_folders);
 
   impl->show_size_column = show_size_column;
-  if (impl->list_size_column)
-    gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
+  gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
 
   impl->sort_column = sort_column;
   impl->sort_order = sort_order;
@@ -9631,9 +9629,6 @@ recent_activate (GtkFileChooserDefault *impl)
 
   recent_hide_entry (impl);
 
-  /* hide the file size column if it's visible */
-  gtk_tree_view_column_set_visible (impl->list_size_column, FALSE);
-
   file_list_set_sort_column_ids (impl);
   recent_start_loading (impl);
 }